﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using ObviousCode.Common.Utils;
using ObviousCode.Common.Utils.Library.Dictionaries;

namespace ObviousCode.Aspect.PluginLibrary.Interfaces
{
    public interface IStateHandler
    {
        string State { get; }

        event EventHandler DragStarted;
        event EventHandler DragCompleted;
        event EventHandler<EventArgs<PointF>> Dragging;
        event EventHandler SelectionStateChanged;

        PointF Position { get; }
        PointF CurrentDragPosition { get; }
        RectangleF LastRenderedBounds { get; set; }

        void SetPosition(PointF pointf);

        object OnMouseDownStateHandler(params object[] args);        
        object OnMouseUpStateHandler(params object[] args);        
        object OnMouseMoveStateHandler(params object[] args);

        bool RequestState(string state);
        
        bool HandlesDrag { get; }        
        bool HandlesHover { get; }
        bool HandlesSelect { get; }

        bool IsInAffinativeDrag { get; }
        void BeginAffinativeDrag();
        void ContinueAffinativeDrag(PointF pointF);
        void EndAffinativeDrag();

        PropertyDictionary Persist();

        void Load(PropertyDictionary propertyDictionary);
    }
}
